<template>
  <PageMain title="详情" is-back>
    <div class="details-content ">
      <div class="title">{{ details.title }}</div>
      <div class="desc">
        <div class="desc-item">
          <img class="desc-item-icon" src="@/assets/author.png"></img>
          <div class="desc-item-name">作者：{{ details.author }}</div>

        </div>
        <div class="desc-item">
          <img class="desc-item-icon" src="@/assets/publish_time.png"></img>
          <div class="desc-item-name">发布时间：{{ details.createTime }}</div>
        </div>
      </div>
      <div class="desc-content" v-html="details.details"></div>
    </div>
  </PageMain>
</template>
<script setup>
import {ref} from "vue";
import { Plus } from '@element-plus/icons-vue'
import { useRouter, useRoute } from "vue-router";
import {http} from "@/api";
const router = useRouter()
const route = useRoute()
const id = route.params.id
const details = ref({
  name: '',
  author: '',
  source: '',
  createTime: '',
  details: ''
})
if (id) {
  http.Tender.read({
    id
  }).then(res => {
    details.value = {
      ...res.data,
      details: res.data.content
    }
  })
}
</script>
<style lang="scss">
.details-content {
  padding: 75px 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  .title {
    font-family: PingFang SC;
    font-size: 34px;
    font-weight: normal;
    line-height: 34px;
    color: #3D3D3D;
  }
  .desc {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0 22px 0;
    .desc-item {
      display: flex;
      align-items: center;
      margin-right: 23px;
      .desc-item-icon {
        width: 15px;
        height: 15px;
        margin-right: 6px;
      }
      .desc-item-name {
        font-family: PingFang SC;
        font-size: 14px;
        font-weight: normal;
        line-height: 15.6px;
        letter-spacing: 0px;
        color: #666666;
      }
    }
  }
}
</style>
